package com.black.app.domain.req.my.mydata;

import cn.hutool.core.util.StrUtil;
import com.black.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

/**
 * ClassName: AppMyDataQueryReq
 * Package: com.black.app.domain.req.my
 * Description:
 *
 * @Author luo
 * @Create 2024/10/23 21:58
 * @Version 1.0
 */
@Data
@ToString(callSuper = true)
@ApiModel(value = "AppMyDataReq", description = "我的数据查询请求对象")
public class AppMyDataQueryReq extends PageAbstructReq {

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id", hidden = true)
    private Long userId;

    /**
     * 用户电话
     */
    @ApiModelProperty(value = "用户电话")
    private String phone;

    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    private String sex;

    /**
     * 用户昵称
     */
    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    /**
     * 会员等级
     */
    @ApiModelProperty(value = "会员等级")
    private String levelId;

    /**
     * 账号状态（0正常 1停用）
     */
    @ApiModelProperty(value = "账号状态（0正常 1停用）")
    private String status;

    /**
     * 排序
     */
    @ApiModelProperty(hidden = true)
    @Override
    public String getOrderBy() {
        if (StrUtil.isNotEmpty(super.getOrderByColumn())) {
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }

}
